package org.example.designPattern.structural.proxy.staticproxy;

public class Proxy extends BusinessExecute{
    private BusinessExecute businessExecute;

    public Proxy(BusinessExecute businessExecute) {
        this.businessExecute = businessExecute;
    }

    public void execute(){
        beforeProcess();
        businessExecute.executeBusiness();
        afterProcess();
    }

    private void beforeProcess(){
        System.out.println("-----Proxy before processor-----");
    }

    private void afterProcess(){
        System.out.println("-----Proxy after processor-----");
    }
}
